package com.tiantian.novel.resolver;

import com.tiantian.novel.model.ChapterInfo;
import com.tiantian.novel.model.NovelSummary;

import java.io.IOException;

/**
 * 小说解析器
 *
 * @author wangkai
 * @since 2020/12/18.
 */
public interface NovelResolver {
    /**
     * 解析小说基本信息+章节数
     *
     * @param url 主页url
     *
     * @return NovelInfo
     * @throws IOException
     */
    NovelSummary resolveNovelSummary(String url) throws Exception;

    /**
     * 解析章节内容
     *
     * @param url 章节url
     *
     * @return
     * @throws IOException
     */
    ChapterInfo resovleChapter(String url) throws Exception;

    /**
     * download Image
     *
     * @param logo
     *
     * @return
     */
    byte[] getImage(String logo) throws IOException;
}
